<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>统计管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }
		
		function doPost(value){
			document.statForm.action = $(value).attr("href");
			alert(statForm.action);
			$(statForm).attr("modelAttribute",$(value).attr("attr")); 
			statForm.submit();
		}
		
	</script>
</head>
<body>
	<ul class="nav nav-tabs">
		<li><a href="${ctx}/wechat/statics/statUsed/">按奖品名称统计</a></li>
		<li class="active"><a href="${ctx}/wechat/statics/stat/">按奖品类型统计</a></li>
		<li><a href="${ctx}/wechat/statics/statCategory/">按抽奖类型统计</a></li>
		<li><a href="${ctx}/wechat/statics/statTerminalUsed/">按核销单位统计</a></li>
		<li><a href="${ctx}/wechat/statics/statShoppingUsed/">按微购物核销统计</a></li>
	</ul>
	<form id="searchForm"   action="${ctx}/wechat/statics/stat" method="post" class="breadcrumb form-search">
		
		<label>开始时间：</label>
					<input id="startTime" name="startTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="${startTime }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
						
		<label>结束时间 ：</label>
					<input id="endTime" name="endTime" type="text" readonly="readonly" maxlength="20" class="input-medium Wdate"
						value="${endTime }"
						onclick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss',isShowClear:false});"/>
						
		&nbsp;&nbsp;&nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
	</form>
	<tags:message content="${message}"/>
	
	
 	
	<table id="contentTable" class="table table-striped table-bordered ">
		<thead><tr>
		<shiro:hasPermission name="sys:user:edit"><th>所属商家</th></shiro:hasPermission>
			<th>状态类型</th>
			<th>在线抽奖</th>
			<th>优惠券</th>
			<th>有奖转发</th>
			<th>在线秒杀</th>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${statics}" var="stat">
			<tr>
				<shiro:hasPermission name="sys:user:edit"><td>${user.name}</td></shiro:hasPermission>
				<td>${stat.stat_type}</td>
				<td><a href="${ctx }/wechat/lotteryRecord/?lotteryRecord.user.id=${user.id}&lotteryRecord.status=${stat.status}"  >	${stat.lottery_cnt}  </a></td>
				<td><a href="${ctx }/mom/coupon/?coupon.user.id=${user.id}&coupon.status=${stat.status}">${stat.coupon_cnt}</a></td>
				<td><a href="${ctx }/wechat/share/circleShare/?circleShare.user.id=${user.id}&circleShare.status=${stat.status}">${stat.share_cnt}</a></td>
				<td><a href="${ctx }/wechat/seckillGainer/?seckillGainer.user.id=${user.id}&seckillGainer.status=${stat.status}">${stat.seckill_cnt}</a></td>
			</tr>
		</c:forEach>
		</tbody>
	</table>
</body>
</html>
